DNS and routing policies

DNS and routing policies

Clock Icon2022.03.23

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

We all know what a DNS is, but for those who don't here is a short introduction: DNS stands for Domain Name System, to simply put it, it's a service which matches domain name of a certain website to IP of its servers. Whenever you type the url of a certain website in the search box, DNS returns IP of one of the thousands of servers allocated to serve the users of the website.

Websites and their DNS records

Here we can see some websites and what is the result which their DNS records return.

Let's dive deeper and get into the terminologies of DNS and types of routing policies present.

Top Level Domain names : .com, .co.in, .edu, .org etc

Domain Registrars : Can assign domain names and register them to ICANN which is stored in the whois database.

Start Of Authority : Stores the following information:

  1. Admin of the zone
  2. Name of server that supplied data for that zone.
  3. Current version of data file
  4. Number of seconds a secondary name server should wait before checking for updates. 
  5. The number of seconds a secondary server should wait before retrying failed zone transfer.
  6. The max number of seconds a secondary server can use data before it expires and needs to be refreshed. 

Types of DNS records:

  • A record : DNS to IP in a single step
  • TTL record : The amount of time for which a DNS record is cached.
  • CName : One domain name to another
  • Alias records : Mapping DNS to DNS. Always use A-record for all your application, in the inner layer you can use the same DNS for cname.

Routing Policies

Simple Routing Policy

1 Record -> Multiple IPs. 

All the IPs serve the same content/application.

Weighted Routing Policy

Weighted routing

Routing to multiple resources based on user defined weights. 

Latency Based Routing

Data packets are routed to the nearest server or to the one which has lowest latency. 

Failover Routing Policy

Used to set a failover for your current DNS records, if the requests start failing or take too much time to respond to, then a failover routing policy helps you to re-route to another DNS record which can play as a backup.

Geolocation Routing Policy

Routing based on the source location of the request, you can serve different types of content over different regions. 

Geo-proximity Based Routing

Geolocation based routing with weighted biases letting you choose how much traffic is routed where.

Multi-value Answer Routing

Like simple routing but returns multiple values instead of just one.

Conclusion

I hope this made your understanding about DNS and the terminologies better. Thanks for reading, more coming up very soon.

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.